home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / BBS / EZY120_1.ZIP / STRUCT.ARJ / CLIB.ARJ / FSIZE.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-09  |  352 b   |  19 lines

  1.  
  2. #include <ezycom.h>
  3. #include <stdio.h>
  4. #include <io.h>
  5. #include <stdlib.h>
  6. #include <dir.h>
  7. #include <dos.h>
  8.  
  9. longint FileSize(FILE *hStream)
  10. {
  11.     return(filelength(fileno(hStream)));
  12. }
  13.  
  14. longint FileSize(char *Filename)
  15. {
  16.   struct ffblk ffblk;
  17.   return(((findfirst(Filename,&ffblk,FA_RDONLY | FA_ARCH) == 0) ? ffblk.ff_fsize : -1));
  18. }
  19.